-- GENERATED SPELL FOR [Cavedweller Worg] --


function spell0_30164(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(52474,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30164', 572, 1)
end

function spell1_30164(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(61676,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30164', 0, 1)
end

function Sorts_30164(pUnit, Event)
local choix_sorts_30164 = math.random(0, 1)
if choix_sorts_30164 == 0 then
pUnit:RegisterEvent('spell0_30164', 1, 1)
end
if choix_sorts_30164 == 1 then
pUnit:RegisterEvent('spell1_30164', 1, 1)
end
end

function mob30164_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30164', math.random(1500, 3000), 1)
end

function mob30164_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30164_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30164_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30164, 1, 'mob30164_Action')
RegisterUnitEvent(30164, 2, 'mob30164_Leave')
RegisterUnitEvent(30164, 3, 'mob30164_Kill')
RegisterUnitEvent(30164, 4, 'mob30164_Die')
